# Contributor: Will Sinatra <wpsinatra@gmail.com>
# Maintainer: Will Sinatra <wpsinatra@gmail.com>
pkgname=networkmanager-l2tp
pkgver=1.8.8
pkgrel=0
pkgdesc="L2TP support for NetworkManager"
url="https://github.com/nm-l2tp/NetworkManager-l2tp"
license="GPL-2.0-only"
# s390x and riscv64 blocked by networkmanager
arch="all !s390x !riscv64"
makedepends="intltool python3 libnma-dev libtool automake autoconf gettext-dev
	glib-dev ppp-dev nss-dev gtk+3.0-dev libsecret-dev openssl1.1-compat-dev"
depends="ppp xl2tpd strongswan"
source="$pkgname-$pkgver.tar.gz::https://github.com/nm-l2tp/NetworkManager-l2tp/archive/$pkgver.tar.gz"
options="!check" #no check
builddir="$srcdir/NetworkManager-l2tp-$pkgver"
subpackages="$pkgname-lang"

build() {
	./autogen.sh
	./configure \
		--prefix=/usr \
		--sysconfdir=/etc \
		--localstatedir=/var \
		--libexecdir=/usr/lib/NetworkManager \
		--with-pppd-plugin-dir=/usr/lib/pppd/2.4.7 \
		--without-libnm-glib
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
c1573b07e0b5baf8f0201655a217d2dfd48dfb829c3573a272ee31daa5a3144029ecbcf7d1d8b90965bd5f8a7df0aa2c42060490ccfce5966ef7affda76cb514  networkmanager-l2tp-1.8.8.tar.gz
"
